package com.jamie.api.storage;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author Jamie
 * @date 2020/4/13
 */
@FeignClient("storage")
@RequestMapping("storage")
public interface StorageService {
    /**
     * 扣减库存
     *
     * @param commodityCode 商品编码
     * @param count         扣减数量
     */
    @PostMapping
    void deduct(@RequestParam("commodityCode") String commodityCode, @RequestParam("count") int count);
}
